package com.mansoor.app.islamicnames.Predicates;

import com.mansoor.app.islamicnames.beans.Name;
import com.mansoor.app.islamicnames.util.AppConstants;
import org.apache.commons.collections.Predicate;

/**
 * Created by IntelliJ IDEA.
 * User: TKMAQ61
 * Date: Oct 16, 2009
 * Time: 9:27:01 AM
 */
public class SearchName implements Predicate
{
    private final String name;


    public SearchName(String name)
    {
        this.name = name;
    }


    public boolean evaluate(Object o)
    {
        boolean result = false;
        Name name = (Name) o;

        if (name.getName().equalsIgnoreCase(this.name))
        {
            result = true;
        }


        return result;  //To change body of implemented methods use File | Settings | File Templates.
    }
}

